home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / misc / wclass20.zip / VC15MAIN.CPP < prev    next >
C/C++ Source or Header  |  1995-01-16  |  1KB  |  26 lines

  1. //This sample main program may be used to test Visual C++ code generation scripts.
  2. //In With Class load cppcar.omt.  Run the scripts vc15head.sct and vc15func.sct
  3. //with a QuickWin project. Add to the project vc15main.cpp, vehicle.cpp, 
  4. //car.cpp, motor.cpp, passenge.cpp, tire.cpp, and cellular.cpp.
  5. //Comments and suggestions are solicited Richard Felsinger, RCF Associates
  6. //960 Scottland Dr, Mt Pleasant, SC 29464 tele 803-881-3648 71162.755@compuserve.com
  7.  
  8. #include <iostream.h>
  9. #include "stdafx.h"
  10. #include "car.h"
  11.  
  12. int main ()
  13.   Car car1;                     //Creates car1 object without a passenger
  14.   cin >> car1;                  //Invokes insertion operator>>                                  
  15.   cout << car1;                 //Invokes extraction operator<<
  16.   
  17.   Car car2 (55, 10);                //Invokes constructor with arguments
  18.     
  19.   car1 = car2;                  //Invokes assignment operator=
  20.   if (car1 == car2) cout << "Cars are equal.";//Invokes equality operator==
  21.   else cout << "Cars are not equal.";
  22.  
  23.   return 0;
  24.